package com.h3c.nem.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.Data;
import lombok.Getter;

/**
 * tb_teach_schedule
 * @author 
 */
@Data
public class TbTeachSchedule implements Serializable {
    private String workerId;

    private String teacherId;

    private Date startDate;

    private Date endDate;

    private Integer allowanceFlag;

    private Date allowanceDate;

    @TableId(type= IdType.AUTO)
    private int teachSecId;

    private static final long serialVersionUID = 1L;

    @Getter
    public enum AllowanceFlag{
        YES(1,"已申报"),
        NO(0,"未申报"),
        NOT(2,"不可申报"),
        CAN(3,"可申报");

        @EnumValue
        Integer flag;

        @JsonValue
        String name;

       /* @JsonCreator
        public static AllowanceFlag init(String flag) {
            if (flag.equals("1")) {
                return YES;
            }
            return NO;
        }
        @JsonCreator*/
        AllowanceFlag(Integer flag, String name) {
            this.flag = flag;
            this.name = name;
        }
    }

}